package com.ruoyi.ruoyiqywechat.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 用户会员对象 user_membership
 * 
 * @author 好六
 * @date 2025-10-10
 */
public class UserMembership extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 套餐ID */
    @Excel(name = "套餐ID")
    private Long planId;

    /** 会员开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "会员开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 会员到期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "会员到期时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 状态：1-有效，0-过期 */
    @Excel(name = "状态：1-有效，0-过期")
    private Integer status;

    /** 自动续费：1-开启，0-关闭 */
    @Excel(name = "自动续费：1-开启，0-关闭")
    private Integer autoRenew;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setPlanId(Long planId) 
    {
        this.planId = planId;
    }

    public Long getPlanId() 
    {
        return planId;
    }

    public void setStartTime(Date startTime) 
    {
        this.startTime = startTime;
    }

    public Date getStartTime() 
    {
        return startTime;
    }

    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }

    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }

    public void setAutoRenew(Integer autoRenew) 
    {
        this.autoRenew = autoRenew;
    }

    public Integer getAutoRenew() 
    {
        return autoRenew;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("planId", getPlanId())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("status", getStatus())
            .append("autoRenew", getAutoRenew())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
